package com.ljtxxhwj.myblob.controller;

import com.ljtxxhwj.myblob.entity.Comment;
import com.ljtxxhwj.myblob.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/comment")
public class CommentController2 {
    @Autowired
    CommentService  commentService;

    @GetMapping("/getCommentOnMe.do")
    public List<Comment> getCommentOnMe(int userId){
        return commentService.getCommentOnMe(userId);
    }

}
